#! /bin/sh

name=mesa-demos
version=9.0.0
revision=1
tarball_url="https://archive.mesa3d.org/demos/mesa-demos-${version}.tar.xz"
tarball_blake2b="426211886344e88616670f0da8c71385e0ab86fd7dab60c7a477b165f33d2f7bd5fd9297f1f67c78e60fed5c98ab8851c1bd4ae92a6b0b486fd158196b109eb0"
imagedeps="meson ninja-build"
hostdeps="gcc pkg-config"
deps="core-libs freetype2 mesa glu libx11 libxext"

configure() {
    meson_configure \
        -Dgles1=disabled \
        -Dosmesa=disabled \
        -Dlibdrm=disabled \
        -Dx11=enabled \
        -Dwith-system-data-files=true
}

build() {
    ninja -j${parallelism}
}

package() {
    DESTDIR="${dest_dir}" ninja install

    post_package_strip
}
